<!-- BLOCK HỎI ĐÁP -->
<?php
	$sql = "SELECT * FROM question_answers";
	$connection = yii::app()->db;
	$command = $connection->createCommand($sql);
	$result =  $command->queryAll();
?>
<div class="block block-file block-ans-ques">
	<h2 class="title title-bd"><a href="<?php echo PIUrl::createUrl('/home/questionAnswers');?>"><?php echo translate("Hỏi - đáp"); ?></a></h2>
	<?php if(!empty($result)){ ?>
		<ul>
			<?php foreach($result as $row){ ?>
				<li title="<?php echo $row['question']; ?>">
					<p><?php echo $this->word_limiter($row['question'], 15); ?></p>
					<a href="<?php echo PIUrl::createUrl('/home/questionAnswers',array('#'=>$row['id']));?>" class="answer"><?php echo translate("Đáp"); ?></a>
				</li>
			<?php } ?>
		</ul>
	<?php } ?>
</div>